package com.gao.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Projectname springboot-03-web
 * @Filename IndexController
 * @Author an
 * @Data 2022/8/8 10:26
 * @Description TODO
 */

//在templates下的所有页面，只能通过Controller来在跳转
//这个需要某班引擎支持，thymeleaf
@Controller
public class IndexController {

    @RequestMapping("/test")
    public String test(Model model){
        model.addAttribute("msg","hello");
        return "test";
    }
}
